/** AppointmentModel */
package server.service.appointment;

import java.util.List;

import domain.appointment.Appointment;

/**
 * talks to the appointmentDao and the panels
 * @author jessienewman
 * @version $Revision: 1.0 $
 */
public class AppointmentModel {
	/**
	 * Field dao.
	 */
	private AppointmentDao dao;

	/**
	 * Constructor for AppointmentModel.
	 */
	public AppointmentModel() {
		this.dao = new AppointmentDao();
	}

	/**
	 * Method getPatientAppointments.
	 * @param patientId Integer
	
	 * @return ArrayList<Appointment> */
	public List<Appointment> getPatientAppointments(Integer patientId) {
		return dao.getPatientAppointments(patientId);
	}

	/**
	 * Method getDoctorAppointments.
	 * @param doctorId Integer
	
	 * @return ArrayList<Appointment> */
	public List<Appointment> getDoctorAppointments(Integer doctorId) {
		return dao.getDoctorAppointments(doctorId);
	}

	/**
	 * Method getFuturePatientAppointments.
	 * @param patientId Integer
	
	 * @return ArrayList<Appointment> */
	public List<Appointment> getFuturePatientAppointments(Integer patientId) {
		return dao.getFuturePatientAppointments(patientId);
	}

	/**
	 * Method getFutureDoctorAppointments.
	 * @param doctorId Integer
	
	 * @return ArrayList<Appointment> */
	public List<Appointment> getFutureDoctorAppointments(Integer doctorId) {
		return dao.getFutureDoctorAppointments(doctorId);
	}
	
	/**
	 * Method getLastMonthDoctorAppointments.
	 * @param doctorId Integer
	
	 * @return ArrayList<Appointment> */
	public List<Appointment> getLastMonthDoctorAppointments(Integer doctorId) {
		return dao.getLastMonthDoctorAppointments(doctorId);
	}
	
	/**
	 * Method addAppointment.
	 * @param a Appointment
	 */
	public void addAppointment(Appointment a) {
		dao.addAppointment(a);
	}
	
	/**
	 * Method remove.
	 * @param a Appointment
	 */
	public void remove(Appointment a) {
		dao.removeAppointment(a);
	}
	
	/**
	 * super's toString
	
	 * @return super's toString */
	public String toString() {
		return super.toString();
	}
	
	/**
	 * Method save.
	 */
	public void save() {
		dao.save();
	}
}
